<?php
//Having issues with no name links
class whitefolks_scraper extends BlogScraper
{
    var $date;    
    
    function __construct()
    {
        parent::__construct('whitefolks');
        $this->post_scraper = new whitefolks_post_scraper();
    }

    
    function getPostLinks($post)
    {
        return $this->xpath->query("//html//body//h2//a");
    }
}

class whitefolks_post_scraper extends PostScraper
{

    
    function getDate()
    {
        $date = $this->url;
        $date_parts = explode("/",$date);
        $date = $date_parts[3].'-'.$date_parts[4].'-'.$date_parts[5];
        echo $date;
        return date('Y-m-d H:i:s', strtotime($date));

    }
    
    function prepareTrack($track)
    {
        if (!trim($track['name']) || $track['name'] == "download" || $track['name'] == "mp3") 
        {
            $parts = explode('/', $track['url']);
            $filename = $parts[count($parts)-1];
            $track['name'] = $filename;
        }
        return $track;
    }
    
    
}

?>